package org.rebluh.hulunbuirtravelnetworkbackendframework.repository;

import org.rebluh.hulunbuirtravelnetworkbackendframework.domain.Panorama;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

public interface PanoramaRepository extends MongoRepository<Panorama, String> {

    @Query(value = "{}", fields = "{ 'title': 1, 'preview': 1, 'panorama': 1 }")
    List<Panorama> getAllPanorama();

    @Query(value = "{}", fields = "{ 'title': 1, 'panorama': 1}")
    List<Panorama> findByToHuberId(String toHulberId);
}
